<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for src/views/main-sidebar.vue</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="..\..\prettify.css" />
    <link rel="stylesheet" href="..\..\base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(..\..\sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="..\..\index.html">All files</a> / <a href="index.html">src/views</a> main-sidebar.vue
    </h1>
    <div class='clearfix'>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Statements</span>
        <span class='fraction'>0/47</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Branches</span>
        <span class='fraction'>0/30</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Functions</span>
        <span class='fraction'>0/22</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Lines</span>
        <span class='fraction'>0/38</span>
      </div>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111</td><td class="line-coverage quiet"><span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&lt;<span class="cstat-no" title="statement not covered" >t<span class="fstat-no" title="function not covered" >em</span>plate&gt;</span>
  &lt;aside class="site-sidebar" :class="'site-sidebar--' + sidebarLayoutSkin"&gt;
    &lt;div class="site-sidebar__inner"&gt;
<span class="cstat-no" title="statement not covered" >      &lt;el-menu</span>
        :default-active="menuActiveName || 'home'"
        :collapse="sidebarFold"
        :collapseTransition="false"
        class="site-sideba<span class="cstat-no" title="statement not covered" >r__menu"&gt;</span>
        &lt;el-menu-item index="home" @click="$router.push({ name: 'home' })"&gt;
          &lt;icon-svg name="s<span class="cstat-no" title="statement not covered" >houye" class="site-sidebar__menu-icon"&gt;&lt;/ico</span>n-svg&gt;
          &lt;span slot="title"&gt;首页&lt;/span&gt;
        &lt;/el-men<span class="cstat-no" title="statement not covered" >u-item&gt;</span>
        &lt;el-submenu index="demo"&gt;
<span class="fstat-no" title="function not covered" >          &lt;template slot="title"</span>&gt;<span class="cstat-no" title="statement not covered" ></span>
            &lt;icon-svg name="shoucang" class="site-sidebar__menu-icon"&gt;&lt;/icon-svg&gt;
            &lt;span&gt;demo&lt;/span&gt;
          &lt;/template&gt;
          &lt;el-menu-item index="demo-echarts" @click="$router.push({ name: 'demo-echarts' })"&gt;
            &lt;icon-svg name="tubiao" class="site-sidebar__menu-icon"&gt;&lt;/icon-svg&gt;
            &lt;span slot="title"&gt;echarts&lt;/span&gt;
          &lt;/el-menu-item&gt;
          &lt;el-menu-item index="demo-ueditor" @click="$router.push({ name: 'demo-ueditor' })"&gt;
            &lt;icon-svg name="editor" class="site-sidebar__menu-icon"&gt;&lt;/icon-svg&gt;
            &lt;span slot="title"&gt;ueditor&lt;/span&gt;
          &lt;/el-menu-item&gt;
        &lt;/el-submenu&gt;
        &lt;sub-menu
          v-for="menu in menuList"
          :key="menu.menuId"
          :menu="menu"
          :dynamicMenuRoutes="dynamicMenuRoutes"&gt;
        &lt;/sub-menu&gt;
      &lt;/el-menu&gt;
    &lt;/div&gt;
  &lt;/aside&gt;
&lt;/template&gt;
&nbsp;
&lt;script&gt;
  import SubMenu from './main-sidebar-sub-menu'
  import { isURL } from '@/utils/validate'
  export default {
    data () {
      return {
        dynamicMenuRoutes: []
      }
    },
    components: {
      SubMenu
    },
    computed: {
      sidebarLayoutSkin: {
        get () { return this.$store.state.common.sidebarLayoutSkin }
      },
<span class="cstat-no" title="statement not covered" >      sidebarFold: {</span>
        get () { <span class="fstat-no" title="function not covered" >retur</span>n this.$store.state.common.sidebarFold }
<span class="cstat-no" title="statement not covered" >      },</span>
      menuList: {
        get () { return this.$store.state.common.menuList },
        set (val) { this.$store.commit('common/updateMenuList', val) }
      },
      menuActiveName: {
        get () { return this.$store.state.common.menuActiveName },
        set (val) { this.$store.commit('common/updateMenuActiveName', val) }
      },
      mainTabs: {
        get () { ret<span class="fstat-no" title="function not covered" >urn </span>this.$store.state.common.mainTabs },
<span class="cstat-no" title="statement not covered" >        set (val) { this.$store.commit('common/updateMainTa</span>bs', val) }
      },
      mainTabsActiveName: {
        get () { return this.$store.state.common.mainTabsActiveName },
        set (val) { <span class="fstat-no" title="function not covered" >this</span>.$store.commit('common/updateMainTabsActiveName', val) }
      }<span class="cstat-no" title="statement not covered" ></span>
    },
    watch: {
      $route: 'routeHandle'
    },<span class="fstat-no" title="function not covered" ></span>
    crea<span class="cstat-no" title="statement not covered" >ted () {</span>
      this.menuList = JSON.parse(sessionStorage.getItem('menuList') || '[]')
      this.dynamicMe<span class="fstat-no" title="function not covered" >nuRo</span>utes = JSON.parse(sessionStorage.getItem('dynamicMenuRoutes') || '[]')
      th<span class="cstat-no" title="statement not covered" >is.routeHandle(this.$route)</span>
    },
    methods: {
      // 路由操作
      routeHandle (r<span class="fstat-no" title="function not covered" >oute</span>) {
<span class="cstat-no" title="statement not covered" >        if (route.meta.isTab) {</span>
          // tab选中, 不存在先添加
          var tab = <span class="fstat-no" title="function not covered" >this</span>.mainTabs.filter(item =&gt; item.name === route.name)[0]
<span class="cstat-no" title="statement not covered" >          if (!tab) {</span>
            if (route.meta.isDynamic) {
              route = this.dynamicMenuRoutes.filter(item =&gt; item.name === route.name)[0]
              if (!route) {
                retu<span class="fstat-no" title="function not covered" >rn c</span>onsole.error('未能找到可用标签页!')
<span class="cstat-no" title="statement not covered" >              }</span>
            }
            tab = {<span class="fstat-no" title="function not covered" ></span>
<span class="cstat-no" title="statement not covered" >              menuId: route.meta.menuId || route.name,</span>
              name: route.name,
              title: route.meta.title,
              type: isURL(route.meta.iframeUrl) ? 'iframe' : 'module',
              iframe<span class="fstat-no" title="function not covered" >Url:</span> route.meta.iframeUrl || ''
<span class="cstat-no" title="statement not covered" >            }</span>
            this.mainTabs = this.mainTabs.concat(tab)
          }<span class="fstat-no" title="function not covered" ></span>
<span class="cstat-no" title="statement not covered" >          this.menuActiveName = tab.menuId + ''</span>
          this.mainTabsActiveName = tab.name
        }
      }
    }
  }
&lt;/script&gt;
<span class="fstat-no" title="function not covered" ></span></pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu Sep 20 2018 10:14:21 GMT+0800 (中国标准时间)
</div>
</div>
<script src="..\..\prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="..\..\sorter.js"></script>
</body>
</html>
